package org.uoss.webapp.framework.json;

import java.util.Collection;

import net.sf.json.JsonConfig;
import net.sf.json.processors.JsonValueProcessor;

import org.hibernate.collection.internal.PersistentSet;

public class JSONPersistentSetProcessor implements JsonValueProcessor {

	@Override
	public Object processArrayValue(Object value, JsonConfig jcfg) {
		return value;
	}

	@Override
	public Object processObjectValue(String key, Object value, JsonConfig jcfg) {
		if(value instanceof Collection<?> && value instanceof PersistentSet){
			return null;
		}
		return value;
	}
}
